ci: fix amicode-release UI gate check for the unconditional layout memo - #81
Merged
Merged
Conversation
ead3274 ("lock down appearance settings; force v2 layout") changed settings.tsx to `newLayoutDesigns: createMemo(() => true)`. That minifies to `newLayoutDesigns:<F>(()=>!0)`, so the gate check's grep for the old channel-gated shape `newLayoutDesigns,<VAR>)` finds nothing and the step exits 1 — blocking any release cut from current mainline. Accepts the new unconditional shape, keeps the legacy channel-gated shape as a fallback, and still fails loudly on real drift. Also fixes two latent set -e bugs that made the check exit silently instead of reporting: a `grep && { ... }` AND-list, and a `VAR=$(grep|...)` assignment that aborts under pipefail when grep does not match — the latter meant the existing "gate pattern not found" message could never fire. Verified against four cases: current build (shape A on), the shipping vendored binary (legacy shape B on), a binary patched to =>!1, and a binary with the pattern removed. Correct rc and a diagnostic in each.
jack-champagne
force-pushed
the
jack/fix-release-gate-check
branch
from
July 28, 2026 22:47
570545a to
fc7be4a
Compare
jack-champagne
added a commit
to harmoniqs/amicode
that referenced
this pull request
Jul 29, 2026
opencode ead3274d3 changed settings.tsx to `newLayoutDesigns: createMemo(() => true)` — unconditional, no channel dependency. That minifies to `newLayoutDesigns:Z(()=>!0)`, so the grep for the old channel-gated shape `newLayoutDesigns,<VAR>)` finds nothing and vsix-gate reds on any binary from amicode.10 onward. Accept the new shape, keep the legacy channel-gated one as a fallback, and still fail closed on a genuine gate-OFF build. Also fixes the silent-failure bug: under `set -euo pipefail` the non-matching grep aborted the script before its own "pattern not found" diagnostic could print, so the job failed with no explanation. Mirrors harmoniqs/opencode#81, which fixed the same two bugs in the fork's release workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release blocker
ead3274d3("lock down appearance settings; force v2 layout", 2026-07-24 — afterv1.17.3-amicode.9) changedsettings.tsxto:That minifies to
newLayoutDesigns:Z(()=>!0). The gate check greps for the old channel-gated shapenewLayoutDesigns,<VAR>), finds nothing, and exits 1.Any release cut from current mainline fails the
Gate checkstep and never publishes. Found while building the branch for #73 locally:The change itself is good — the setting no longer depends on the build channel at all, so the original failure mode (channel
latest/proddefaults it OFF) is structurally gone. Only the check needs to catch up.Fix
Accept the new unconditional shape, keep the legacy channel-gated shape as a fallback in case the setting is ever rewired to the channel default, and still fail loudly on genuine drift.
Also fixes two latent
set -ebugs that made this check exit silently rather than report:grep -aq '…' && { echo FAIL; exit 1; }— underset -ea non-matching grep in an AND-list aborts the whole step with no message.VAR=$(grep … | head … | sed …)— underset -o pipefaila no-match grep aborts the assignment. This is pre-existing: it means the existing"FAIL: gate pattern not found"diagnostic could never actually print. The step just died with no explanation, which is exactly what happened above.Verification
Extracted
check()from the workflow and ran it against four binaries:OK: gate hardcoded ON (unconditional memo)OK: gate ON (zG=!0)(()=>!1)FAIL: unconditional memo is OFF (=>!1)FAIL: gate pattern not found … (minifier drift? update this check)Case 2 confirms the legacy path still works; cases 3 and 4 confirm it fails for the right reasons with a usable message.
Note
This is independent of #73 (the provider/model port) — it blocks releases either way and should land first.